/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AddInfo.java
 *
 * Created on 28.01.2012, 19:48:19
 */
package appClient;

import com.google.gson.Gson;
import engine.City;
import engine.Country;
import engine.GType;
import engine.Street;
import engine.TypeAdress;
import engine.TypePhone;
import java.util.List;
import javax.swing.JTable;
import protocol.Command;

/**
 *
 * @author User
 */
public class AddInfo extends javax.swing.JFrame implements Forms {
  private ConnectClient cli;
  private String phone[][];
  private String adrr[][];
  public String[] items =  {"not"};
  public String[] adrType =  {"not"};
  public String[] countr =  {"not"};
  public String[] cit =  {"not"};
  public String[] stre =  {"not"};
  public List<Country> countryList;
  public List<City> cityList;

  /** Creates new form AddInfo */
  public AddInfo() {
    initComponents();
  }
  
  public AddInfo(ConnectClient cli) {
    this.cli = cli;
    setLink();
    initComponents();
    ClientCommand.getTypePhone(cli);
    ClientCommand.getTypeAdr(cli);
    if(!cli.role.equals("SUser")){
      ClientCommand.getTypeCountry(cli);
      GetCity(cli);
      GetStreet(cli);
    }
    if(cli.role.equals("SUser")){
      blockElement();
    }
  }
  
  
   public void setLink()
  {
    cli.clientProtocol.ab = this;
  }

  public void setAdrType(String[] adrType) {
    this.adrType = adrType;
  }

  public void setCit(String[] cit) {
    this.cit = cit;
  }

  public void setCityList(List<City> cityList) {
    this.cityList = cityList;
  }

  public void setCountr(String[] countr) {
    this.countr = countr;
  }

  public void setCountryList(List<Country> countryList) {
    this.countryList = countryList;
  }

  public void setItems(String[] items) {
    this.items = items;
  }

  public void setStre(String[] stre) {
    this.stre = stre;
  }
  
  public void blockElement()
  {
    ButtonAddCountry.setVisible(false);
    ButtonAddCity.setVisible(false);
    ButtonAddStreet.setVisible(false);
    TextFieldCountry.setVisible(false);
    TextFieldCity.setVisible(false);
    TextFieldCountryID.setVisible(false);
    TextFieldStreet.setVisible(false);
    TextFieldCityID.setVisible(false);  
//    ScrollPaneCountry.setVisible(false); 
//    ScrollPaneCity.setVisible(false); 
//    ScrollPaneStreet.setVisible(false);         
  }
  
  public boolean phoneTable()
  {
      JTable phonTable = new JTable();
      phonTable.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
      Object  ob[][] = new Object [items.length][1];
      for (int i=0; i < items.length; i++)
      {
        ob[i][0] = items[i];
      }
      
      phonTable.setModel(new javax.swing.table.DefaultTableModel(ob,new String [] {"Type"}));
      ScrollPaneTel.setViewportView(phonTable);
      return true;
  }
  
  public boolean AdrTable()
  {
    JTable phonTable2 = new JTable();
    phonTable2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    Object ob[][] = new Object[adrType.length][1];
    for (int i = 0; i < adrType.length; i++) {
      ob[i][0] = adrType[i];
    }

    phonTable2.setModel(new javax.swing.table.DefaultTableModel(ob, new String[]{"Type"}));
    ScrollPaneAdr.setViewportView(phonTable2);
    
    JTable phonTable3 = new JTable();
    phonTable3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    Object ob2[][] = new Object[countr.length][2];
    for (int i = 0; i < countr.length; i++) {
      ob2[i][0] = countr[i];
      if (countryList != null){
        ob2[i][1] = countryList.get(i).ID;
      }
    }
    
    
    phonTable3.setModel(new javax.swing.table.DefaultTableModel(ob2, new String[]{"Type", "ID"}));
    ScrollPaneCountry.setViewportView(phonTable3);
  
    if (cityList != null){
      JTable phonTable4 = new JTable();
      phonTable4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
      Object ob3[][] = new Object[cityList.size()][2];
      for (int i = 0; i < cityList.size(); i++) {

        ob3[i][0] = cityList.get(i).name;
        ob3[i][1] = cityList.get(i).ID;

      }
     

      phonTable4.setModel(new javax.swing.table.DefaultTableModel(ob3, new String[]{"Type", "ID"}));
      ScrollPaneCity.setViewportView(phonTable4);
    
    }
    
    JTable phonTable5 = new JTable();
    phonTable5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    Object ob4[][] = new Object[stre.length][1];
    for (int i = 0; i < stre.length; i++) {
      ob4[i][0] = stre[i];
    }

    phonTable5.setModel(new javax.swing.table.DefaultTableModel(ob4, new String[]{"Type"}));
    ScrollPaneStreet.setViewportView(phonTable5);
    return true;
  }
  
  private void GetCity(ConnectClient cli)
  {
    Command obj = new Command();
    Gson gson = new Gson();
    obj.Type = "Get";
    GType gt = new GType();
    gt.Type = "City";
    obj.Data = gson.toJson(gt);
    obj.Add = "-1";
    String res = gson.toJson(obj);
    cli.refuse(res);
  }
  
  private void GetStreet(ConnectClient cli)
  {
    Command obj = new Command();
    Gson gson = new Gson();
    obj.Type = "Get";
    GType gt = new GType();
    gt.Type = "Street";
    obj.Data = gson.toJson(gt);
    obj.Add = "-1";
    String res = gson.toJson(obj);
    cli.refuse(res);
  }
  
  private void commandSet(ConnectClient cli, String str, Object ob)
  {
    Command obj = new Command();
    Gson gson = new Gson();
    obj.Type = "Set";
    GType gt = new GType();
    gt.Type = str;
    obj.Data = gson.toJson(gt);
    obj.Add = gson.toJson(ob);
    String res = gson.toJson(obj);
    cli.refuse(res);
  }

  /** This method is called from within the constructor to
   * initialize the form.
   * WARNING: Do NOT modify this code. The content of this method is
   * always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        ScrollPaneTel = new javax.swing.JScrollPane();
        ScrollPaneAdr = new javax.swing.JScrollPane();
        LabeltelType = new javax.swing.JLabel();
        LabelAdrType = new javax.swing.JLabel();
        TextFieldTel = new javax.swing.JTextField();
        ButtonAddTel = new javax.swing.JButton();
        buttonClose = new java.awt.Button();
        ButtonAddAdr = new javax.swing.JButton();
        TextFieldAdr = new javax.swing.JTextField();
        LabelAdrType1 = new javax.swing.JLabel();
        ScrollPaneCountry = new javax.swing.JScrollPane();
        TextFieldCountry = new javax.swing.JTextField();
        ButtonAddCountry = new javax.swing.JButton();
        LabelAdrCity = new javax.swing.JLabel();
        ScrollPaneCity = new javax.swing.JScrollPane();
        TextFieldCity = new javax.swing.JTextField();
        ButtonAddCity = new javax.swing.JButton();
        LabelAdrStreet = new javax.swing.JLabel();
        ScrollPaneStreet = new javax.swing.JScrollPane();
        TextFieldStreet = new javax.swing.JTextField();
        ButtonAddStreet = new javax.swing.JButton();
        TextFieldCountryID = new javax.swing.JTextField();
        TextFieldCityID = new javax.swing.JTextField();

        setBackground(new java.awt.Color(255, 255, 255));

        LabeltelType.setText("TelType");

        LabelAdrType.setText("AdrType");

        ButtonAddTel.setText("Add");
        ButtonAddTel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ButtonAddTelActionPerformed(evt);
            }
        });

        buttonClose.setLabel("Закрыть");
        buttonClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonCloseActionPerformed(evt);
            }
        });

        ButtonAddAdr.setText("Add");
        ButtonAddAdr.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ButtonAddAdrActionPerformed(evt);
            }
        });

        LabelAdrType1.setText("Country");

        ButtonAddCountry.setText("Add");
        ButtonAddCountry.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ButtonAddCountryActionPerformed(evt);
            }
        });

        LabelAdrCity.setText("City");

        ButtonAddCity.setText("Add");
        ButtonAddCity.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ButtonAddCityActionPerformed(evt);
            }
        });

        LabelAdrStreet.setText("Street");

        ButtonAddStreet.setText("Add");
        ButtonAddStreet.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ButtonAddStreetActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(buttonClose, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addComponent(LabeltelType)
                                .addGap(21, 21, 21))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(ScrollPaneTel, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(10, 10, 10))
                            .addComponent(TextFieldTel, javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE)
                            .addComponent(ButtonAddTel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(9, 9, 9)
                                .addComponent(LabelAdrType))
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(ScrollPaneAdr, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(ButtonAddAdr)
                                    .addGap(8, 8, 8))
                                .addComponent(TextFieldAdr, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(14, 14, 14)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(ButtonAddCountry)
                                .addComponent(TextFieldCountry)
                                .addComponent(ScrollPaneCountry, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(24, 24, 24)
                                .addComponent(LabelAdrType1)))))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(ButtonAddCity)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(TextFieldCountryID, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(32, 32, 32))
                        .addComponent(TextFieldCity)
                        .addComponent(ScrollPaneCity, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addComponent(LabelAdrCity)))
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(ButtonAddStreet)
                            .addGap(36, 36, 36)
                            .addComponent(TextFieldCityID, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(16, 16, 16))
                        .addComponent(TextFieldStreet)
                        .addComponent(ScrollPaneStreet, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addComponent(LabelAdrStreet)))
                .addGap(35, 35, 35))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(LabelAdrType)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ScrollPaneAdr, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(TextFieldAdr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(ButtonAddAdr))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(LabelAdrType1)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(ScrollPaneCountry, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(LabeltelType)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(ScrollPaneTel, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(TextFieldCountry, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(ButtonAddCountry))
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(TextFieldTel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(ButtonAddTel)))))
                        .addGap(18, 18, 18)
                        .addComponent(buttonClose, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(LabelAdrStreet)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ScrollPaneStreet, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TextFieldStreet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ButtonAddStreet)
                            .addComponent(TextFieldCityID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(LabelAdrCity)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ScrollPaneCity, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(TextFieldCity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ButtonAddCity)
                            .addComponent(TextFieldCountryID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(11, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

  private void buttonCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCloseActionPerformed
    this.dispose();
  }//GEN-LAST:event_buttonCloseActionPerformed

  private void ButtonAddTelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonAddTelActionPerformed
    TypePhone tp = new TypePhone();
    tp.Type = TextFieldTel.getText();
    commandSet(cli, "TypePhone", tp);
  }//GEN-LAST:event_ButtonAddTelActionPerformed

  private void ButtonAddAdrActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonAddAdrActionPerformed
    TypeAdress tp = new TypeAdress();
    tp.Type = TextFieldAdr.getText();
    commandSet(cli, "TypeAdress", tp);
  }//GEN-LAST:event_ButtonAddAdrActionPerformed

  private void ButtonAddCountryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonAddCountryActionPerformed
    Country tp = new Country();
    tp.name = TextFieldCountry.getText();
    commandSet(cli, "Country", tp);
  }//GEN-LAST:event_ButtonAddCountryActionPerformed

  private void ButtonAddCityActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonAddCityActionPerformed
    City tp = new City();
    tp.name = TextFieldCity.getText();
    tp.OID = TextFieldCountryID.getText();
    commandSet(cli, "City", tp);
  }//GEN-LAST:event_ButtonAddCityActionPerformed

  private void ButtonAddStreetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonAddStreetActionPerformed
    Street tp = new Street();
    tp.name = TextFieldStreet.getText();
    tp.OID = TextFieldCityID.getText();
    commandSet(cli, "Street", tp);
  }//GEN-LAST:event_ButtonAddStreetActionPerformed

  /**
   * @param args the command line arguments
   */
  public static void main(String args[]) {
    /* Set the Nimbus look and feel */
    //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
     * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
     */
    try {
      for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
          javax.swing.UIManager.setLookAndFeel(info.getClassName());
          break;
        }
      }
    } catch (ClassNotFoundException ex) {
      java.util.logging.Logger.getLogger(AddInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
      java.util.logging.Logger.getLogger(AddInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
      java.util.logging.Logger.getLogger(AddInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
      java.util.logging.Logger.getLogger(AddInfo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    //</editor-fold>

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(new Runnable() {

      public void run() {
        new AddInfo().setVisible(true);
      }
    });
  }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton ButtonAddAdr;
    private javax.swing.JButton ButtonAddCity;
    private javax.swing.JButton ButtonAddCountry;
    private javax.swing.JButton ButtonAddStreet;
    private javax.swing.JButton ButtonAddTel;
    private javax.swing.JLabel LabelAdrCity;
    private javax.swing.JLabel LabelAdrStreet;
    private javax.swing.JLabel LabelAdrType;
    private javax.swing.JLabel LabelAdrType1;
    private javax.swing.JLabel LabeltelType;
    private javax.swing.JScrollPane ScrollPaneAdr;
    private javax.swing.JScrollPane ScrollPaneCity;
    private javax.swing.JScrollPane ScrollPaneCountry;
    private javax.swing.JScrollPane ScrollPaneStreet;
    private javax.swing.JScrollPane ScrollPaneTel;
    private javax.swing.JTextField TextFieldAdr;
    private javax.swing.JTextField TextFieldCity;
    private javax.swing.JTextField TextFieldCityID;
    private javax.swing.JTextField TextFieldCountry;
    private javax.swing.JTextField TextFieldCountryID;
    private javax.swing.JTextField TextFieldStreet;
    private javax.swing.JTextField TextFieldTel;
    private java.awt.Button buttonClose;
    // End of variables declaration//GEN-END:variables

 


  @Override
  public boolean setTableAdr() {
    AdrTable();
    return true;
  }

    @Override
    public void setPhoto() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
